perm filename PAGE7.CH[MF,ALS] blob sn#786608 filedate 1985-02-19 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	@x Change to file name conventions:
C00007 ENDMK
C⊗;
@x Change to file name conventions:
@ The string |cur_name| is supposed to be set to the external name of the
\.{GF} file for the current font. This usually means that we need to
prepend the name of the default directory, and
to append the suffix `\.{.GF}'. Furthermore, we change lower case letters
to upper case, since |cur_name| is a \PASCAL\ string.
@↑system dependencies@>

@<Move font name into the |cur_name| string@>=
for k←1 to name_length do cur_name[k]←' ';
if p=0 then
	begin for k←1 to default_directory_name_length do
		cur_name[k]←default_directory[k];
	r←default_directory_name_length;
	end
else r←0;
for k←font_name[cur_font] to font_name[cur_font+1]-1 do
	begin incr(r);
	if r+4>name_length then
		abort('DVIIMP capacity exceeded (max font name length=',
			name_length:1,')!');
@.DVIIMP capacity exceeded...@>
	if (names[k]≥"a")∧(names[k]≤"z") then
			cur_name[r]←xchr[names[k]-@'40]
	else cur_name[r]←xchr[names[k]];
	end;
cur_name[r+1]←'.'; cur_name[r+2]←'G'; cur_name[r+3]←'F'; {|cur_name[r+4]←'M';|}
@y
@ The string |cur_name| is supposed to be set to the external name of the
\.{GF} file for the current font. This usually means that we need to
prepend the name of the default directory, and
to append the suffix `\.{.GF}'. But at {\mc SAIL} we append the
directory name after the font name. And we compress `\.{oldenglish}' to
`\.{oldish}'.
@↑system dependencies@>

@<Move font name into the |cur_name| string@>=
for k←1 to name_length do cur_name[k]←' ';
r←0;
for k←font_name[cur_font]+p to font_name[cur_font+1]-1 do
    if (k≤font_name[cur_font]+p+2)∨(k≥font_name[cur_font+1]-3) then
	begin incr(r);
	if r+4>name_length then
		abort('DVItype capacity exceeded (max font name length=',
			name_length:1,')!');
@.DVItype capacity exceeded...@>
	if (names[k]≥"a")∧(names[k]≤"z") then
			cur_name[r]←xchr[names[k]-@'40]
	else cur_name[r]←xchr[names[k]];
	end;
m←font_m_val[cur_font];
    print(' m=',m:1);

cur_name[r+1]←'.';
cur_name[r+2]← xchr[m div 100+@'60];
cur_name[r+3]← xchr[(m mod 100) div 10+@'60];
cur_name[r+4]← xchr[m mod 10+@'60];

r←r+4;
if p=0 then for k←1 to default_directory_name_length do
	begin incr(r);
	if r>name_length then abort('Font name is too long!');
	cur_name[r]←default_directory[k];
	end
else for k←font_name[cur_font] to font_name[cur_font]+p-1 do
	begin incr(r);
	if r>name_length then abort('Font name is too long!');
	if (names[k]≥"a")∧(names[k]≤"z") then
			cur_name[r]←xchr[names[k]-@'40]
	else cur_name[r]←xchr[names[k]];
	end
@z